package wh.coach.pivot3.table.dynamic;

import lombok.EqualsAndHashCode;

import java.util.LinkedHashMap;
import java.util.List;

@EqualsAndHashCode
public class MapRow extends LinkedHashMap<String, String> implements DataRow {
    @Override
    public List<String> getProperties() {
        return keySet().stream().toList();
    }

    @Override
    public List<String> getValues() {
        return values().stream().toList();
    }


    @Override
    public String getValue(final String prop) {
        return get(prop);
    }

    @Override
    public void setValue(final String prop, final String value) {
        this.put(prop, value);
    }
}
